<template>
  <a-descriptions title="量表评估" bordered size="middle" :column="{ xxl: 2, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
    <a-descriptions-item label="项目" :span="3">
      <a-row>
        <a-col :span="12">
          <span>服务前</span>
        </a-col>
        <a-col :span="12">
          <span>服务后</span>
        </a-col>
      </a-row>
    </a-descriptions-item>
    <a-descriptions-item label="疾病评估" :span="3" bordered>
      <a-row type="flex" justify="space-around" align="middle" :gutter="16">
        <a-col :span="12" v-if="evaluationFirst && evaluationFirst.angiocardiopathyReport">
          <div v-if="evaluationFirst.angiocardiopathyReport">
            <p>量表名称：心血管10年风险评估</p>
            <p>评估时间：{{ evaluationFirst.angiocardiopathyReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.angiocardiopathyReport.result }}</p>
          </div>
          <div v-if="evaluationFirst.diabetesReport">
            <a-divider />
            <p>量表名称：糖尿病风险评估</p>
            <p>评估时间：{{ evaluationFirst.diabetesReport.evaluationTime }}</p>
            <p v-html="`评估结果：${evaluationFirst.diabetesReport.result}`"></p>
          </div>
        </a-col>
        <a-col :span="12" v-if="evaluationSummary && evaluationSummary.angiocardiopathyReport">
          <div v-if="evaluationSummary.angiocardiopathyReport">
            <p>量表名称：心血管10年风险评估</p>
            <p>评估时间：{{ evaluationSummary.angiocardiopathyReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.angiocardiopathyReport.result }}</p>
          </div>
          <div v-if="evaluationSummary.diabetesReport">
            <a-divider />
            <p>量表名称：糖尿病风险评估</p>
            <p>评估时间：{{ evaluationSummary.diabetesReport.evaluationTime }}</p>
            <p v-html="`评估结果：${evaluationSummary.diabetesReport.result}`"></p>
          </div>
        </a-col>
        <!-- <a-col :span="12" v-else>
          <div :style="{ width: '100%', textAlign: 'center' }">
            <a-button :style="{ height: '3rem', width: '5rem' }" @click="summaryRecord"> 录入 </a-button>
          </div>
        </a-col> -->
      </a-row>
    </a-descriptions-item>
    <a-descriptions-item label="行为评估" :span="3" bordered>
      <a-row type="flex" justify="space-around" align="middle" :gutter="16">
        <a-col :span="12" v-if="evaluationFirst && evaluationFirst.sdscaReport">
          <div v-if="evaluationFirst.sdscaReport">
            <p>量表名称：自我管理行为(SDSCA)评估</p>
            <p>评估时间：{{ evaluationFirst.sdscaReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.sdscaReport.result }}</p>
          </div>
          <div v-if="evaluationFirst.bmqReport">
            <a-divider />
            <p>量表名称：服药信念量表（BMQ）评估</p>
            <p>评估时间：{{ evaluationFirst.bmqReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.bmqReport.result }}</p>
          </div>
          <div v-if="evaluationFirst.mmas8Report">
            <a-divider />
            <p>量表名称：Morisky用药依从性问卷（MMAS-8）评估</p>
            <p>评估时间：{{ evaluationFirst.mmas8Report.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.mmas8Report.result }}</p>
          </div>
        </a-col>
        <a-col :span="12" v-if="evaluationSummary && evaluationSummary.sdscaReport">
          <div v-if="evaluationSummary.sdscaReport">
            <p>量表名称：自我管理行为(SDSCA)评估</p>
            <p>评估时间：{{ evaluationSummary.sdscaReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.sdscaReport.result }}</p>
          </div>
          <div v-if="evaluationSummary.bmqReport">
            <a-divider />
            <p>量表名称：服药信念量表（BMQ）评估</p>
            <p>评估时间：{{ evaluationSummary.bmqReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.bmqReport.result }}</p>
          </div>
          <div v-if="evaluationSummary.mmas8Report">
            <a-divider />
            <p>量表名称：Morisky用药依从性问卷（MMAS-8）评估</p>
            <p>评估时间：{{ evaluationSummary.mmas8Report.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.mmas8Report.result }}</p>
          </div>
        </a-col>
        <!-- <a-col :span="12" v-else>
          <div :style="{ width: '100%', textAlign: 'center' }">
            <a-button :style="{ height: '3rem', width: '5rem' }" @click="summaryRecord"> 录入 </a-button>
          </div>
        </a-col> -->
      </a-row>
    </a-descriptions-item>
    <a-descriptions-item label="心理评估" :span="3" bordered>
      <a-row type="flex" justify="space-around" align="middle" :gutter="16">
        <a-col :span="12" v-if="evaluationFirst && evaluationFirst.sasReport">
          <div v-if="evaluationFirst.sasReport">
            <p>量表名称：焦虑自评（SAS）</p>
            <p>评估时间：{{ evaluationFirst.sasReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.sasReport.result }}</p>
          </div>
          <div v-if="evaluationFirst.sdsReport">
            <a-divider />
            <p>量表名称：抑郁自评（SDS）</p>
            <p>评估时间：{{ evaluationFirst.sdsReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.sdsReport.result }}</p>
          </div>
          <div v-if="evaluationFirst.jobReport">
            <a-divider />
            <p>量表名称：马氏工作倦怠通用量表</p>
            <p>评估时间：{{ evaluationFirst.jobReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.jobReport.result }}</p>
          </div>
          <div v-if="evaluationFirst.sleepReport">
            <a-divider />
            <p>量表名称：匹兹堡睡眠评估</p>
            <p>评估时间：{{ evaluationFirst.sleepReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.sleepReport.result }}</p>
          </div>
          <div v-if="evaluationFirst.happyReport">
            <a-divider />
            <p>量表名称：总体幸福感测试</p>
            <p>评估时间：{{ evaluationFirst.happyReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationFirst.happyReport.result }}</p>
          </div>
        </a-col>
        <a-col :span="12" v-if="evaluationSummary && evaluationSummary.sasReport">
          <div v-if="evaluationSummary.sasReport">
            <p>量表名称：焦虑自评（SAS）</p>
            <p>评估时间：{{ evaluationSummary.sasReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.sasReport.result }}</p>
          </div>
          <div v-if="evaluationSummary.sdsReport">
            <a-divider />
            <p>量表名称：抑郁自评（SDS）</p>
            <p>评估时间：{{ evaluationSummary.sdsReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.sdsReport.result }}</p>
          </div>
          <div v-if="evaluationSummary.jobReport">
            <a-divider />
            <p>量表名称：马氏工作倦怠通用量表</p>
            <p>评估时间：{{ evaluationSummary.jobReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.jobReport.result }}</p>
          </div>
          <div v-if="evaluationSummary.sleepReport">
            <a-divider />
            <p>量表名称：匹兹堡睡眠评估</p>
            <p>评估时间：{{ evaluationSummary.sleepReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.sleepReport.result }}</p>
          </div>
          <div v-if="evaluationSummary.happyReport">
            <a-divider />
            <p>量表名称：总体幸福感测试</p>
            <p>评估时间：{{ evaluationSummary.happyReport.evaluationTime }}</p>
            <p>评估结果：{{ evaluationSummary.happyReport.result }}</p>
          </div>
        </a-col>
        <!-- <a-col :span="12" v-else>
          <div :style="{ width: '100%', textAlign: 'center' }">
            <a-button :style="{ height: '3rem', width: '5rem' }" @click="summaryRecord"> 录入 </a-button>
          </div>
        </a-col> -->
      </a-row>
    </a-descriptions-item>
  </a-descriptions>
</template>

<script>
export default {
  name: 'Evaluation',
  props: ['evaluationFirst', 'evaluationSummary'],
  data() {
    return {}
  },
  methods: {
    // summaryRecord() {
    //   this.$emit('fatherFn')
    // },
  }
}
</script>

<style lang="less" scoped>
/deep/ .ant-descriptions-item-label {
  width: 25% !important;
}
/deep/ .ant-descriptions-item-content {
  width: 75% !important;
}
</style>

